package com.cskaoyan.mapper;

import com.cskaoyan.bean.Coupon;
import com.cskaoyan.bean.CouponExample;
import com.cskaoyan.bean.ListData;
import com.cskaoyan.bean.vo.CouponIndexVo;
import com.cskaoyan.bean.wx.vo.IndexCouponVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author
 * @date 2020/12/5 15:21
 */
@Mapper
public interface CouponMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Coupon record);

    int insertSelective(Coupon record);

    Coupon selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Coupon record);

    int updateByPrimaryKey(Coupon record);

    List<Coupon> selectList(@Param("name") String name, @Param("type") Integer type, @Param("status") Integer status, @Param("sortAndOrder") String sortAndOrder);

    List<CouponIndexVo> selectCouponIndex(@Param("type") Integer type);

    Coupon selectByCode(@Param("code") String code);

    List<Coupon> selectCouponInfo(@Param("goodsTotalPrice") int goodsTotalPrice, @Param("userId") Integer userId);

    List<IndexCouponVo> selectCoupon();

    int deleteByExample(CouponExample example);
}

